<?php
//Box
class std_EndBox extends Bout {
	var $width;
	var $height;
	var $flux;
	var $style;

	function setWidth($width) {
		$this->width = $width;
	}

	function setHeight($height) {
		$this->height = $height;
	}

	function setStyle($Style) {
		$this->style .= $Style.';';
	}

	function readFlux() {
		$return = null;
		if(isset($this->_Flux))
			foreach($this->_Flux as $flux)
				if($flux['type'] == 'text')
					$return .= '<pre>'.htmlentities(file_get_contents($flux['flux'])).'</pre>';
				elseif($flux['type'] == 'html')
					$return .= file_get_contents($flux['flux']);
				return $return;
	}

	function build() {
		$Style = null;
		if(isset($this->width))
			$Style = 'width:'.$this->width.'; ';
		if(isset($this->height))
			$Style .= ' height:'.$this->height.'; ';
		if(isset($this->style))
			$Style .= $this->style;
		return '	<div id="'.$this->name.'" style="'.$Style.'">'."\n".$this->readFlux()."\n".$this->inner.'	</div>'."\n";
	}
}
?>